<template>
  <div class="swiper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="item of swiperList" :key="item.id">
        <img class="swiper__img" :src="item.imgUrl" />
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script type="text/ecmascript-6">
export default {
  name: 'carrousel',
  props: {
    swiperList: Array
  },
  data () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true
      }
    }
  }
}
</script>

<style lang="scss" scoped>
  @import "~styles/scss/mixins";
  .swiper {
    font-size: 0;
    @include fixedHeght(31.25%);
    width: 100%;
    &__img {
      width: 100%;
    }
  }
</style>
<style scoped>
  .swiper >>> .swiper-pagination-bullet-active {
    background: #fff;
  }
</style>
